import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
const CustomerManage = resolve => require(['./views/customerManage/customer.vue'],resolve)
const applyManage = resolve => require(['./views/customerManage/applyManage.vue'],resolve)
const orderManage = resolve => require(['./views/customerManage/orderManage.vue'],resolve)
const CustomerDetail = resolve => require(['./views/customerManage/customerDetail.vue'], resolve)
const RoutineReporting = resolve => require(['./views/contentManagement/routineReporting.vue'], resolve)
const ReportDetail = resolve => require(['./views/contentManagement/reportDetail.vue'], resolve)
const PurpleResearch = resolve => require(['./views/contentManagement/purpleResearch.vue'], resolve)
const TypeManage = resolve => require(['./views/contentManagement/typeManage.vue'], resolve)
const LogManagement = resolve => require(['./views/systemManagement/logManagement.vue'], resolve)

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        redirect: '/customerManage',
        component: Home,
        name: '客户管理',
        iconCls: 'fa fa-id-card-o', //图标样式class
        // leaf: true, //只有一个节点（只有一级菜单）
        children: [
            { path: '/customerManage', component: CustomerManage, name: '客户管理' },
            { path: '/applyManage', component: applyManage, name: '会员申请列表' },
            { path: '/orderManage', component: orderManage, name: '服务申请列表' },
            { path: '/customerDetail', component: CustomerDetail, name: '客户详情', hidden: true },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '内容管理',
        iconCls: 'el-icon-message',
        children: [
            { path: '/routineReporting', component: RoutineReporting, name: '常规报告' },
            { path: '/reportDetail', component: ReportDetail, name: '企业名称', hidden: true },
            { path: '/purpleResearch', component: PurpleResearch, name: '紫顶研究' },
            { path: '/typeManage', component: TypeManage, name: '类型管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-cog',
        // leaf: true,//只有一个节点（只有一级菜单）
        children: [
            { path: '/logManagement', component: LogManagement, name: '日志管理' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;